<?php

  $aux = explode ( '|', isset($_GET['id']) ? $_GET['id'] : '' );
  $TypetestUid = str_replace ( '"', '', $aux[0] );

  require_once ( PATH_PLUGINS . 'hr' . PATH_SEP . 'class.hr.php');
  $pluginObj = new hrClass ();

  require_once ( "classes/model/HrTypesTests.php" );
  //if exists the row in the database propel will update it, otherwise will insert.
  $tr = HrTypesTestsPeer::retrieveByPK( $TypetestUid  );

  if ( ( is_object ( $tr ) &&  get_class ($tr) == 'HrTypesTests' ) ) { 
     $fields['TYPETEST_UID'] = $tr->getTypetestUid();
     $fields['TYPETEST'] = $tr->getTypetest();
     $fields['TYPETESTDESCRIPTION'] = $tr->getTypetestdescription();
  }
  else
    $fields = array();

  $G_MAIN_MENU = 'workflow';
  $G_SUB_MENU = 'hrTypesTests';
  $G_ID_MENU_SELECTED = '';
  $G_ID_SUB_MENU_SELECTED = '';


  $G_PUBLISH = new Publisher;
  $G_PUBLISH->AddContent('xmlform', 'xmlform', 'hr/hrTypesTestsEdit', '', $fields, 'hrTypesTestsSave' );
  G::RenderPage('publish', 'blank');
?>